<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	template="/template/main_default.xhtml">

	<ui:define name="body">
		
			<h:form id="formLogin" prependId="false" >
				<p:message  for="formLogin" />
				<p:focus context="formLogin"/>
				<p:fieldset legend="Login" toggleable="false" toggleSpeed="500">
					
					<h:panelGrid columns="2" rendered="#{!loginMB.logado}">
		
							<f:validateBean>
		
								<h:outputLabel for="username">#{messages['tbUsuario.label.username']}:</h:outputLabel>
								<p:inputText id="username" value="#{loginMB.username}" />
								<p:outputLabel for="password">#{messages['tbUsuario.label.password']}:</p:outputLabel>
								<p:password id="password" value="#{loginMB.password}" />
								<h:outputLabel />
								<p:commandButton value="Login" style="font-size:0.7em;" action="#{loginMB.loginResult}"
							rendered="#{!loginMB.logado}" update="formLogin" icon="ui-icon-person" ajax="true"/>
		
							</f:validateBean>
		
						</h:panelGrid>
				</p:fieldset>
					

			</h:form>

	</ui:define>

</ui:composition>